<?php
    //require_once 'headerOut.php';
    require_once '../inc/user.php';
    /* 登录页
     * @param noe uPass 传递到处理页
     * @判断是否有cookie["uId"] 用于登录
     *  */
?>
<!DOCTYPE html>
<html>
	<head>
	<meta charset="UTF-8">
	<link rel="stylesheet" href="../css/login.css">
	<!-- <script type="text/javascript" src="../inc/jquery-2.1.1.min.js"></script> -->
	<script src="../script/login.js"></script>
	<script src="../script/jump.js"></script>
	<title>登录页-阅读记</title>
	</head>
	<body onload="Focus()">
<?php 
    if (isset($_COOKIE['uId']))
    {
        $user=getUserId($_COOKIE['uId']);
        $userName=$user["uName"];
        $userPass=$user["uPass"];
    }
    else 
    {
        $userName="";
        $userPass="";
    }

?>
		<div class="body">
				<div class="login">
					<div class="tr">
						<div class="loginlogo">
							<img alt="" src="../image/logoBottom.png">
						</div>
					</div>
					<div class="tr">
						<div class="logintitle">
							<span><strong>登录阅读记</strong></span>
						</div>
					</div>
			<form class="logForm" name="logForm" action="../admin/doLog.php" method="post" onsubmit="return checkForm()">
					<div class="tr">
						<div class="loginnew">
							<div class="padding">
								<div class="p1">
									<span>用户名或邮箱*</span>
								</div>
								<div class="p2"><input type="text"  id="noe" name="noe" value="<?php echo $userName?>" /></div>
								<div class="p1">
									<span>密码*</span>
									<p class="forget"><a href="../style/forgetPass.php">忘记密码</a></p>
								</div>
								<div class="p2"><input type="password" name="uPass" value="<?php echo $userPass?>" /></div>
								<div class="code">
									<span>验证码*</span>
								</div>
								<div class="vcode">
									<input type="text" name="vCode" />
									<div class="codeimg">
										<img src="../inc/validatecode.php" onclick="this.src='../inc/validatecode.php?rand='+Math.random()" alt="点击，更换验证码" >
									</div>
								</div>
								<div class="rem" >
									<input type="checkbox" name="keep" value="true">
									<span>是否记住当前的登录信息</span> 
								</div>
								<div class="lbtn"><button type="submit" id="lbtn">登录</button></div>
							</div>
						</div>
					</div><!-- /tr -->
			</form>
					<div class="rCreat">
						<div>
							<button id="rCreat" onclick="jumpReg()">创建新账号</button>
						</div>
					</div>
					<div class="bottom">
						<span>条款</span>
						<span>帮助</span>
						<span>安全</span>
						<span>联系我们</span>
					</div>
				</div><!-- /login -->
		</div><!-- /body -->
		
	</body>
</html>